/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package CastleDefense.Managers;

/**
 *
 * @author Firedemon
 */
public class GameManager 
{
    public enum Difficulty { EASY, NORMAL, HARD, VERY_HARD }
    
    private String UNITS_PATH       = "./sprites/units/";
    private String PROJECTILES_PATH = "sprites/projectiles/";
    private String MONSTERS_PATH    = "sprites/monsters/";
    
    private Difficulty difficulty   = Difficulty.EASY;
    private double     doorLife     = 1000;
    private int        currentWave  = 0;
    
    public String UNITS_PATH()
    {
        return UNITS_PATH;
    }
    
    public String PROJECTILES_PATH()
    {
        return PROJECTILES_PATH;
    }
    
    public String MONSTERS_PATH()
    {
        return MONSTERS_PATH;
    }
    
    public double getDoorLife()
    {
        return doorLife;
    }

    public void damageDoor()
    {
        doorLife -= 1 + (currentWave * 0.6f);

        if(doorLife <= 0)
        {
             //notifyDeath();
        }
    }
    
    public int getCurrentWave()
    {
        return currentWave;
    }
    
    public void nextWave()
    {
        currentWave++;
    }
    
    public Difficulty getDifficulty()
    {
        return difficulty;
    }
    
    public void setDifficulty(Difficulty diff)
    {
        this.difficulty = diff;
    }
    
    public static final GameManager getInstance() 
    {
        return SingletonHolder.instance;
    }
    
    @SuppressWarnings("synthetic-access")
    public static class SingletonHolder
    {
        protected static final GameManager instance = new GameManager();
    }
}
